﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;

namespace IHISCETeim.BLL
{
    public class SPapersRemindController
    {
        /// <summary>
        /// 新增证件信息
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static int Add(SPapersRemindInfo obj)
        {
          
            return SPapersRemindDAL.Add(obj);
        }
        /// <summary>
        /// 删除证件信息
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static bool Delete(int ID)
        {
            return SPapersRemindDAL.Delete(ID);
        }
        /// <summary>
        /// 根据  ID获取相关证件信息
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public static SPapersRemindInfo GetByID(int ID)
        {
            return CBO.FillObject<SPapersRemindInfo>(SPapersRemindDAL.GetByID(ID));
        }
        /// <summary>
        /// 获取每天需提醒的证件列表
        /// </summary>
        /// <returns></returns>
        public static List<SPapersRemindInfo> GetDayNeedRemind()
        {
            return CBO.FillCollection<SPapersRemindInfo>(SPapersRemindDAL.GetDayNeedRemind());
        }
        /// <summary>
        /// 获取月头一天需提醒的证件列表
        /// </summary>
        /// <returns></returns>
        public static List<SPapersRemindInfo> GetMonthNeedRemind()
        {
            return CBO.FillCollection<SPapersRemindInfo>(  SPapersRemindDAL.GetMonthNeedRemind());
        }

        public static DataTable GetPagination(string WhereSql, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
            return SPapersRemindDAL.GetPagination(WhereSql, PageIndex, PageSize, Sort, ref  TotalCount);
        }
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static bool Update(SPapersRemindInfo obj)
        {
           
            return SPapersRemindDAL.Update(obj);
        }
    }
}
